home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / stripcr.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  911 b   |  45 lines

  1. <!--- This example shows StripCR --->
  2.  
  3. <HTML>
  4.  
  5. <HEAD>
  6. <TITLE>
  7. StripCR Example
  8. </TITLE>
  9. </HEAD>
  10.  
  11. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  12. <BODY  bgcolor="#FFFFD5">
  13.  
  14. <H3>StripCR Example</H3>
  15.  
  16. <P>Function StripCR is useful for preformatted HTML
  17. display of data (PRE) entered into TEXTAREA fields.
  18.  
  19. <CFIF IsDefined("form.myTextArea")>
  20.  
  21. <PRE>
  22. <CFOUTPUT>#StripCR(form.myTextArea)#</CFOUTPUT>
  23. </PRE>
  24.  
  25.  
  26.  
  27. </CFIF>
  28.  
  29. <!--- use #Chr(10)##Chr(13)# to simulate a line feed/carriage
  30. return combination; i.e, a return --->
  31. <FORM ACTION="stripcr.cfm" METHOD="POST">
  32. <TEXTAREA NAME="MyTextArea" COLS="35" ROWS=8>
  33. This is sample text and you see how it scrolls<CFOUTPUT>#Chr(10)##Chr(13)#</CFOUTPUT>
  34. From one line <CFOUTPUT>#Chr(10)##Chr(13)##Chr(10)##Chr(13)#</CFOUTPUT> to the next
  35. </TEXTAREA>
  36.  
  37. <INPUT TYPE="Submit" NAME="show me the html version">
  38. </FORM>
  39.  
  40.  
  41.  
  42. </BODY>
  43.  
  44. </HTML>       
  45.